import allure
from page_object.roncoo_login import RoncooLogin
from page_element.roncoo_payele import *
import logging
from utils.timer import sleep
#结算之后打款成功

class PaySettlement(RoncooLogin):
    """首页搜索商品后退出登录"""

    def paysettlement(self):

        self.roncoo_login()
        with allure.step(f"点击支付管理"):
            self.click(pay_pe.paymanagnent_Lo)
        with allure.step(f"点击支付产品信息"):
            self.click(pay_pe.productmsg)
        with allure.step(f"点击添加支付产品"):
            self.click(pay_pe.payproduct_loc)
        with allure.step(f"添加支付产品编码"):
            self.send_keys(pay_pe.productcode_loc,'y002')
        with allure.step(f"添加产品名称"):
            self.click(pay_pe.product_nam)
        with allure.step(f"点击提交"):
            self.click(pay_pe.recnoo_hqkjsye)



        with allure.step(f"支付产品信息"):
            self.click(pay_pe.productms)
        with allure.step(f"设置支付方式"):
            self.click(pay_pe.paystyle)
        with allure.step(f"添加支付方式"):
            self.click(pay_pe.addpaystyl)
        with allure.step(f"点击提交"):
            self.click(pay_pe.submit_loc2 )
        with allure.step(f"用户支付配置"):
            self.click(pay_pe.usepay_loc)
        with allure.step(f"添加支付配置"):
            self.click(pay_pe.payuse_loc)
            
